package xml;

import eNodeB.Fabrique;

public class ParseXMLException extends Exception {

	private static final long serialVersionUID = -662692582333509936L;

	public ParseXMLException() {
		super();
	}

	public ParseXMLException(String string) {
		super(string);
	}

	public static void negativeAttribute(String nameSpace,
			String attributeName, String value) throws ParseXMLException {
		throw new ParseXMLException("Attribut: " + nameSpace + ":"
				+ attributeName + "with value: " + value + " has to be > 0");
	}

	public static void greatherThanMaxAttributeX(String nameSpace,
			String attributeName, double x) throws ParseXMLException {
		throw new ParseXMLException("Attribut: " + nameSpace + ":"
				+ attributeName + "with value: " + x
				+ " has to lower than then "
				+ Fabrique.getFabrique().getTheMap().getX());
	}

	public static void greatherThanMaxAttributeY(String nameSpace,
			String attributeName, double y) throws ParseXMLException {
		throw new ParseXMLException("Attribut: " + nameSpace + ":"
				+ attributeName + "with value: " + y
				+ " has to lower than then "
				+ Fabrique.getFabrique().getTheMap().getY());
	}
}
